Skip to content

Implement subpage generation#64

Merged
dplochcoder merged 11 commits intomainfrom
subpages
Apr 6, 2026
Merged

Implement subpage generation#64
dplochcoder merged 11 commits intomainfrom
subpages

Conversation

@dplochcoder
Copy link
Copy Markdown
Collaborator

Summary of Changes

  • Fixes menu screen titles not supporting l10n
  • Implements subpage generation
    • Can be done automatically through config structure, through custom attributes, or via extending ConfigEntryFactory with custom behavior. Subpage generation is opt-in and requires interested plugins to implement the IModMenuNestedMenu interface to get it.
  • Other minor maintenance not generally user-visible.

This is a breaking change, but only for mods that create their own custom menus (auto-gen is unaffected), and so should be released with an accompanying notification on the mod server. Like the last l10n update, the breakage is mostly source-compatible, but it does require rebuilds and it does require changing implementations of string ModMenuName() to LocalizedText ModMenuName(). I'm not aware of any other breaking changes needed for l10n or otherwise at this time.

Checklist

  • No change is too small for a release, so pick one:
    • I have updated the package version following semantic versioning
    • There is another change actively WIP that will update the version (link issue or PR here)
    • This PR does not update user-facing code/config
    • I'm not sure how to set the version and would like the reviewer's help

@dplochcoder dplochcoder requested a review from flibber-hk April 6, 2026 02:55
Comment thread Silksong.ModMenu/Internal/MenuPrefabs.cs Outdated
Comment thread Silksong.ModMenu/Internal/Tree.cs Outdated
Comment thread Silksong.ModMenu/Plugin/ConfigEntrySubgroup.cs Outdated
Comment thread Silksong.ModMenu/Plugin/IModMenuInterface.cs Outdated
Comment thread Silksong.ModMenu/Plugin/IModMenuNestedMenu.cs
Comment thread Silksong.ModMenu/Plugin/IModMenuNestedMenu.cs
@flibber-hk
Copy link
Copy Markdown
Member

flibber-hk commented Apr 6, 2026

image

I am sure something weird is going on here - I have ostensibly selected option 5 but option 4 still has the L/R fleurs. I'm 99% sure this is out of scope for this PR but just checking if you know anything about it

EDIT Most likely this is because the fleurs aren't getting animated with the MenuOptionHorizontal removed - I'd guess the correct fix is to animate them explicitly (similar to the description). I'm gonna create a new issue

Comment thread Silksong.ModMenu/Plugin/ConfigEntrySubgroup.cs
Comment thread Silksong.ModMenu/Plugin/ConfigEntryFactory.cs Outdated
@flibber-hk
Copy link
Copy Markdown
Member

flibber-hk commented Apr 6, 2026

Approval subject to the unresolved comments (although some of them may not require action :zotesip:)

@flibber-hk
Copy link
Copy Markdown
Member

Um, what is the intended behaviour if you do

        Config.Bind(new("Main.B.C", "Int7"), 7, new("ABC Integer 7"));
        Config.Bind(new("Main.B.C", "Int8"), 8, new("ABC Integer 8"));

What happens is that both of these get placed on the main page

@dplochcoder
Copy link
Copy Markdown
Collaborator Author

Um, what is the intended behaviour if you do

        Config.Bind(new("Main.B.C", "Int7"), 7, new("ABC Integer 7"));
        Config.Bind(new("Main.B.C", "Int8"), 8, new("ABC Integer 8"));

What happens is that both of these get placed on the main page

This was not intended, fixed the algorithm so that it handles the "Main.B.C" collapse correctly.

@dplochcoder dplochcoder merged commit 45e9b15 into main Apr 6, 2026
4 checks passed
@dplochcoder dplochcoder deleted the subpages branch April 6, 2026 16:16
This was referenced Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants